home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" omit-xml-declaration="yes"/>
- <xsl:variable name="common-styles">
- <style type="text/css">
- html { border: 4px solid gray; }
- body { background-color: black; color: silver; font-size: 100%; font-family: Lucida Console, "Courier New", Courier, monospace; overflow: auto; }
- div.title { font-size: 100%; font-weight: bold; border: 0px; padding: 5px 5px 5px 5px; text-align: left; }
- div.content { font: 120%;text-indent: 15px;margin: 10px 10px 10px 10px; border-bottom: 1px dotted silver; text-align: justify; }
- div.header,
- div.footer { color: gray; font-size: small; text-align: right; margin-top: 2px;}
- a { color: white;font-weight: bold;text-decoration: none; }
- a:hover { color: black; background-color: white;text-decoration: none; }
- a img { border: 1px solid white; }
- a:hover img { border: 1px solid blue; }
- </style>
- </xsl:variable>
-
-
- <xsl:template match="//record">
- <html>
- <head>
- <title>News Item</title>
- <xsl:copy-of select="$common-styles"/>
- </head>
- <body>
- <div class="title">
- <a href="{feed/link}"><xsl:value-of select="feed/title" disable-output-escaping="yes"/></a><br/>
- <a href="{item/link}"><xsl:value-of select="item/title" disable-output-escaping="yes"/></a>
- </div>
- <div class="content">
- <xsl:value-of select="item/content" disable-output-escaping="yes"/>
- </div>
- <div class="footer"><xsl:value-of select="item/published" disable-output-escaping="yes"/></div>
-
-
- <div class="footer">
- <xsl:if test="item/comments">
- <xsl:variable name="commentlink" select="item/comments/@link"/>
- <a href="{$commentlink}"><xsl:value-of select="item/comments/@text"/></a>
- </xsl:if>
- <xsl:if test="item/reply">
- <xsl:variable name="replylink" select="item/reply/@link"/>
- <xsl:text> </xsl:text><a href="{$replylink}"><xsl:value-of select="item/reply/@text"/></a>
- </xsl:if>
- </div>
-
- </body>
- </html>
- </xsl:template>
-
- </xsl:stylesheet>
-